<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login at SmarterContext</title>
</head>
<body>
<div style="text-align: center;">
<h1>Any online store retailer</h1>
<hr>
<h3>Remotely login with SmarterContext  </h3>
<form action="LoginRemoteSC">
<p>Username:<input type="text" name="username"></p>
<p>Password:<input type="password" name="password"></p>
<p><input type="submit" value="login with smartercontext"></p>
</form>
<%
	if(request.getQueryString()!=null){
		String error=request.getParameter("Error").toString();
		if(error.equals("0")){
			out.println("<p style=\"color: red\">Invalid credentials</p>");
		}else if(error.equals("1")){
			out.println("<p style=\"color: red\">The credentials length must be less than 16 chars</p>");
		}else if(error.equals("2")){
			out.println("<p style=\"color: red\">Fields void</p>");
		}else if(error.equals("3")){
			out.println("<p style=\"color: red\">Unknown error</p>");
		}
	}


%>
</div>
</body>
</html>